import Modal from './components/Modal.vue'
import Drawer from './components/Drawer.vue'
import Message from './components/Message.vue'
import Notification from './components/Notification.vue'
import Alert from './components/Alert.vue'
import Progress from './components/Progress.vue'
import Loading from './components/Loading.vue'
import Tooltip from './components/Tooltip.vue'

const components = [
  Modal,
  Drawer,
  Message,
  Notification,
  Alert,
  Progress,
  Loading,
  Tooltip
]

const install = function(Vue) {
  components.forEach(component => {
    Vue.component(component.name, component)
  })
}

if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue)
}

export default {
  install,
  Modal,
  Drawer,
  Message,
  Notification,
  Alert,
  Progress,
  Loading,
  Tooltip
}

export {
  Modal,
  Drawer,
  Message,
  Notification,
  Alert,
  Progress,
  Loading,
  Tooltip
} 